package com.lisheny.vip_movie.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * <pre>
 *     author : lisheny
 *     e-mail : 1020044519@qq.com
 *     time   : 2017/09/26
 *     desc   :
 *     version: 1.0
 * </pre>
 */
public class ContentPagetAdapter extends FragmentPagerAdapter {
    private List<Fragment> tabFragments;
    private List<String> tabIndicators;
    public ContentPagetAdapter(FragmentManager fm, List<Fragment> tabFragments,List<String> tabIndicators) {
        super(fm);
        this.tabFragments = tabFragments;
        this.tabIndicators = tabIndicators;
    }

    @Override
    public Fragment getItem(int position) {
        return tabFragments.get(position);
    }

    @Override
    public int getCount() {
        return tabIndicators.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return tabIndicators.get(position);
    }
}
